// define  main namespace 
// set configuration !! 

// namespace �좎룞�쇿뜝�숈삕. 
var com;
if ( !com) com = {}
else if (typeof com != "object")
		throw new Error("com already exist and is not an object");

if( !com.james) com.james = {}
else if (typeof com.james != "object")
	throw new Error("com.james already exists and is not an object");

if ( com.james.em )
	throw new Error("com.james.em already exists ");

com.james.em = {} ;
var em = com.james.em;

em.place = 'office';

// operation define 
em.curOp =0;
em.Operation = {};
em.Operation.AUTOHNT = 0x1;
em.Operation.FEALTY = 0x2;
em.Operation.HDRIN = 0x4;
em.Operation.ENHANCE = 0x8;
em.Operation.BUYSP30 = 0x10;
em.Operation.SP30ACTION = 0x20;
em.Operation.EXGROWING = 0x40;

// pv 
em.Operation.DUR_PV = 0x1000;
em.Operation.LOO_US_PV = 0x2000;
em.Operation.AVOID_PV = 0x4000;

// set test version 
// em.test = {};//{flag:false};
// em.test = true;
em.testdata= {};
em.testdata.NORMAL = 0;
em.testdata.NO_HERO = 1;
em.testdata.LESS_CONTROL = 2;
em.testdata.LESS_SOLS = 3;


em.testdata.type = em.testdata.NORMAL;  
em.testdata.resinfoidx = 0;
em.testdata.conscribeindex = 0;

/*
// set test data !!!
var test_conscribedata =  test_conscribedata_normal_3hero;
var test_soldata = test_soldata_normal;
switch ( em.testdata.type ) {
	
	case em.testdata.LESS_CONTROL:
		test_conscribedata =  test_conscribedata_less_control;
		console.log('set TEST : LESS CONTROL ');
		break;
	case em.testdata.LESS_SOLS:
		test_soldata =  test_soldata_less_sols;
		console.log('set TEST : LESS SOLS  ');
		break;
	
} ;*/



em.debug = {info: 1, warn: 2, error: 3};
em.debug.query_print = true;
em.debug.level =	em.debug.info; 

em.droid = false;

em.device  ={} ;
em.device.iphone = 0;
em.device.an_emul = 1;
em.device.name = 'iphone';

em.user = {};
em.user.name = 'james';
 

em.data = {};




em.error = {};
em.error.ok = 0;
em.error.testerror =1 ;